import { AbstractSearchArgument } from '../../global'
import { CONDITION_TYPE } from '@/utils/constants'

const SEARCH_CONDITION = [
  {
    name: 'title',
    title: '标题',
    placeholder: '支持模糊查询',
    type: CONDITION_TYPE.TEXT,
    value: '',
    visible: false
  },
  {
    name: 'question',
    title: '问题',
    placeholder: '支持模糊查询',
    type: CONDITION_TYPE.TEXT,
    value: '',
    visible: true

  },
  {
    name: 'surveyId',
    title: '问卷ID',
    placeholder: '---xxx--',
    type: CONDITION_TYPE.TEXT,
    value: '',
    visible: false
  },
  {
    name: 'typeId',
    title: '题型',
    placeholder: '--请选择--',
    type: CONDITION_TYPE.SELECT,
    value: '',
    visible: true,
    config: {
      list: [
        {value: '1', label: '单选题'},
        {value: '2', label: '多选题'},
        {value: '4', label: 'NPS题'}
      ]
    }
  }
]

class SearchPieArgument extends AbstractSearchArgument {
  constructor () {
    super()
    this.surveyId = 0
    this.title = ''
    this.question = ''
    this.senderName = ''
    this.typeId = ''
  }
}

export {
  SEARCH_CONDITION,
  SearchPieArgument
}
